import { defineStore } from 'pinia'
export const useAuthStore = defineStore('auth', {
  state: () => ({
    user: null,
    token: null,
    role: null
  }),
  actions: {
    setUser(user, token, role) {
      this.user = user
      this.token = token
      this.role = role
    },
    logout() {
      this.user = null
      this.token = null
      this.role = null
    }
  }
}) 